home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 December / Chip_2001-12_cd1.bin / zkuste / tuning / download / xteq / setup.exe / {app} / plugins / XQ Control Panel Hide 1.xpl < prev    next >
Text File  |  2001-04-26  |  4KB  |  111 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="9"
  3. "COUNT"="1"
  4. "UIPATH 1"="Appearance\Control Panel\System Icons"
  5. "NAME"="Visible System Icons"
  6. "VERSION"="1.21"
  7. "OSVERSION"="111111"
  8. "LANGUAGE"="VBScript"
  9. "TEXT 1"="Display "" applet"
  10. "DESCRIPTION 1"="This plug-in can be used to hide or show the different applets inside Start -> Settings -> Control Panel."
  11. "DESCRIPTION 2"="Not all of these options will be available on every system.  Availability depends upon the software installed on your system."
  12. "DESCRIPTION 3"="NOTE #1: Hiding the "Internet Control Panel" applet will also hide the "Users" applet on Windows 9x systems."
  13. "DESCRIPTION 4"="NOTE #2: Hiding the "System Properties" applet also hides the "Add/Remove Hardware" applet on Windows 9x/ME systems."
  14. "DESCRIPTION 5"="NOTE #3: Hiding the "Mouse Control" applet also hides the "Keyboard","Fonts" and "Printers" applets on Windows 9x/ME systems."
  15. "AUTHOR"="Xteq Systems (CptSiskoX)"
  16. "CONTACTURL"="http://www.xteq.com"
  17. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  18. "COMMENT 1"="See also: MS KB Q207750"
  19. "COMMENT 2"="Special thanks to Maxwell (maxwello@hotpop.com) for his brilliant tips and CptSiskoX (CptSiskoX@flashmail.com) for his help."
  20. "COMMENT 3"="Thanks to JMRParbold@aol.com for the "multimedia and sounds" applet fix!"
  21.  
  22.  
  23. '******************************************************************
  24. '***                ONLY CHANGE LINES BELOW                    ****
  25. '******************************************************************
  26.  
  27. aryDesc=Array("System Properties","Display Properties","Add/Remove Programs","Internet Control Panel","Network Properties","Game Controllers / Joysticks","Modem","Telephony","Passwords Properties","Time and Date","Regional Options","Email","ODBC","Power Management","Mouse Control","DirectX","Scanner and Camera Properties","Desktop Themes","Accessibility Options","Add/Remove Hardware","Fax","Multimedia","Sounds","Infrared","HSP Modem")
  28. aryCPLs=Array("sysdm.cpl","desk.cpl","appwiz.cpl","Inetcpl.cpl","netcpl.cpl","joy.cpl","modem.cpl","telephon.cpl","password.cpl","timedate.cpl","intl.cpl","mlcfg32.cpl","odbccp32.cpl","powercfg.cpl","main.cpl","directx.cpl","sticpl.cpl","themes.cpl","access.cpl","hdwwiz.cpl","fax.cpl","mmsys.cpl","mmsys.cpl sounds","infrared.cpl","ptctrl.cpl") 
  29.  
  30. '******************************************************************
  31. sPath="HKCU\Control Panel\Don't Load\"
  32. sFile="CONTROL.INI"
  33. sFileSec="Don't Load"
  34.  
  35.  
  36.  
  37. SUB Plugin_Initialize
  38.  for i=0 to UBound(aryCPLs)
  39.      Call ReadIt(i+1,aryCPLs(i),aryDesc(i)) 
  40.  next 
  41. END SUB
  42.  
  43. Sub ReadIt(ItemNumber,VAL,Desc)
  44.   Call SetUIElement(ItemNumber,"Show '" & Desc & "' applet")
  45.  
  46.   If GetWinVer=2 or GetWinVer=4 then
  47.      s=RegReadValue(sPath & VAL)
  48.      if IsEmpty(s)=false then
  49.         Call SetUIElementEx(ItemNumber,false)
  50.      else
  51.         Call SetUIElementEx(ItemNumber,true)
  52.      end if
  53.   else
  54.      s=IniReadValue(sFile,sFileSec,VAL)
  55.      if len(s)>0 then
  56.         Call SetUIElementEx(ItemNumber,false)
  57.      else
  58.         Call SetUIElementEx(ItemNumber,true)
  59.      end if   
  60.   end if
  61.  
  62.  
  63. End Sub
  64.  
  65. 'Called when the Plugin should validate the Data the user has entered
  66. SUB Plugin_CheckData(ElementIndex)
  67. END SUB
  68.  
  69. 'Called when the Plugin should apply the changes
  70. SUB Plugin_Apply(ElementIndex,ElementSubIndex)
  71.  for i=0 to UBound(aryCPLs)
  72.      Call WriteIt(i+1,aryCPLs(i)) 
  73.  next 
  74.  
  75.  Call IndicateSettingChange()
  76. END SUB
  77.  
  78. Sub WriteIt(ITM,VAL)
  79.  b=GetUIElementEx(ITM)
  80.  'b=GetUIElement(-1) 'crash
  81.  if b=true then
  82.     'Display it
  83.  
  84.     if GetWinVer=2 or GetWinVer=4 then  
  85.        s=RegReadValue(sPath & VAL)
  86.        if IsEmpty(s)=false then
  87.           Call RegDeleteValue(sPath & VAL)
  88.        end if
  89.     else
  90.        Call IniWriteValue(sFile,sFileSec,VAL,"")
  91.     end if
  92.  
  93.  else
  94.    'Hide it
  95.    
  96.    if GetWinVer=2 or GetWinVer=4 then
  97.       Call RegWriteValue(sPath & VAL,"1",1) 
  98.    else
  99.       Call IniWriteValue(sFile,sFileSec,VAL,"no")
  100.    end if
  101.  
  102.  end if   
  103. End Sub
  104.  
  105.  
  106. 'Called when the Plugin is about to be removed from memory
  107. SUB Plugin_Terminate
  108. END SUB
  109.  
  110.  
  111.